package com.wz.one;

/**
 * @description: （牛奶类、摩卡类...）：相当于ConcreteDecorator
 * @author: WZ
 * @create: 2019-02-14 22:07
 **/

public class Milk extends CondimentDecorator{

    protected Beverage beverage;

    public Milk(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription()+",with milk";
    }

    @Override
    public double cost() {
        return 2.3+beverage.cost();
    }
}
